import request from '@/utils/request'

// 查询下载记录列表
export function listRecord(query) {
  return request({
    url: '/download/record/list',
    method: 'get',
    params: query
  })
}

// 查询下载记录详细
export function getRecord(id) {
  return request({
    url: '/download/record/getById/' + id,
    method: 'get'
  })
}

// 新增下载记录
export function addRecord(data) {
  return request({
    url: '/download/record/add',
    method: 'post',
    data: data
  })
}

// 修改下载记录
export function updateRecord(data) {
  return request({
    url: '/download/record/update',
    method: 'put',
    data: data
  })
}

// 删除下载记录
export function delRecord(id) {
  return request({
    url: '/download/record/delete/' + id,
    method: 'delete'
  })
}

// 导入下载记录
export function importRecord(data) {
    return request({
      url: '/download/record/import',
      method: 'post',
      data: data
    })
}